/**
 * 
 */
package org.mediahouse.trac.model;

/**
 * @author Tin
 * @version %I%, %G%
 * 
 */
public class Task extends AbstractItem implements Item {

    /**
     * Constructs a new task instance with a user-specified UID.
     * 
     * @param uid
     *            the UID string to store for this new task
     */
    public Task(final String uid) {
        super(uid);
    }

    @Override
    public String getId() {
        return this.uid();
    }

    @Override
    public String getDescription() {
        return this.getProperty("description").toString();
    }

    /**
     * Defines the textual description of this task using the given string of
     * text.
     * 
     * @param text
     *            the text to set as the description of this task
     * @return a convenient reference back to this task for chaining
     */
    public Task setDescription(final String description) {
        return (Task) this.setProperty("description", description);
    }

}
